﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace ZhimeiSoft.CharmManager.DOL
{
    public class DBEntityCustomerPayment: DBEntityBase
    {
        /// <summary>
        /// 支付方式表
        /// </summary>
        /// <returns></returns>
        public override string GetTableName()
        {
            return "CustomerPayment";
        }

        public DBEntityCustomerPayment()
            : base()
        {
        }
        public DBEntityCustomerPayment(DataRow drRow)
        {
            this.CPaymentID = Convert.ToInt32(drRow[DBEntityCustomerPayment.FieldName.CPAYMENTID]);
            this.CPayDate = Convert.ToDateTime(drRow[DBEntityCustomerPayment.FieldName.CPAYDATE]);
            this.CEmployeeID = Convert.ToInt32(drRow[DBEntityCustomerPayment.FieldName.CEMPLOYEEID]);
            this.CustomerServiceItemID = Convert.ToInt32(drRow[DBEntityCustomerPayment.FieldName.CUSTOMERSERVICEITEMID]);
            this.PayTypeID = Convert.ToInt32(drRow[DBEntityCustomerPayment.FieldName.PAYTYPEID]);
            object objMemo = drRow[DBEntityCustomerPayment.FieldName.CMEMO];
            if (objMemo != null)
                this.CMemo = objMemo.ToString();

            object objMoney = drRow[DBEntityCustomerPayment.FieldName.CMONEY];
            if (objMoney != null)
                this.CMoney = Convert.ToDecimal(objMoney);

            this.CustomerID = Convert.ToInt32(drRow[DBEntityCustomerPayment.FieldName.CUSTOMERID]);
            this.ServiceItemID = Convert.ToInt32(drRow[DBEntityCustomerPayment.FieldName.SERVICEITEMID]);
        }


        /// <summary>
        /// 充值ID
        /// </summary>
        public int CPaymentID { get; set; }

        /// <summary>
        /// 充值时间
        /// </summary>
        public DateTime CPayDate { get; set; }

        /// <summary>
        /// 充值经手人
        /// </summary>
        public int CEmployeeID { get; set; }

        /// <summary>
        /// 会员服务项目ID
        /// </summary>
        public int CustomerServiceItemID { get; set; }

        /// <summary>
        /// 支付方式ID
        /// </summary>
        public int PayTypeID { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string CMemo { get; set; }

        /// <summary>
        /// 会员ID
        /// </summary>
        public int CustomerID { get; set; }

        /// <summary>
        /// 服务项目ID
        /// </summary>
        public int ServiceItemID { get; set; }

        public decimal CMoney { get; set; }

        /// <summary>
        /// 字段名称
        /// </summary>
        public static class FieldName
        {
            /// <summary>
            /// 充值ID
            /// </summary>
            public const string CPAYMENTID = "CPAYMENTID";

            /// <summary>
            /// 充值时间
            /// </summary>
            public const string CPAYDATE = "CPAYDATE";

            /// <summary>
            /// 充值经手人
            /// </summary>
            public const string CEMPLOYEEID = "CEMPLOYEEID";

            /// <summary>
            /// 会员服务项目ID
            /// </summary>
            public const string CUSTOMERSERVICEITEMID = "CUSTOMERSERVICEITEMID";

            /// <summary>
            /// 支付方式ID
            /// </summary>
            public const string PAYTYPEID = "PAYTYPEID";

            /// <summary>
            /// 备注
            /// </summary>
            public const string CMEMO = "CMEMO";

            /// <summary>
            /// 会员ID
            /// </summary>
            public const string CUSTOMERID = "CUSTOMERID";

            /// <summary>
            /// 服务项目ID
            /// </summary>
            public const string SERVICEITEMID = "SERVICEITEMID";

            /// <summary>
            /// 充值金额
            /// </summary>
            public const string CMONEY = "CMONEY";
        }
    }
}
